<%--
  Created by IntelliJ IDEA.
  User: 31913
  Date: 2023/12/20
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生列表</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>任务列表</title>
    <link href="css/bootstrap.min.css" rel="stylesheet"/>
    <link href="css/font-awesome.min.css?v=4.7.0" rel="stylesheet"/>
    <link href="ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.18.3" rel="stylesheet"/>
    <link href="css/animate.min.css?v=20210831" rel="stylesheet"/>
    <link href="css/style.min.css?v=20210831" rel="stylesheet"/>
    <link href="ruoyi/css/ry-ui.css?v=4.7.8" rel="stylesheet"/>
    <link href="ajax/libs/jquery-layout/jquery.layout-latest.css?v=1.4.4" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
</head>
<body>
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()">
                    <i class="fa fa-plus"></i> 新增学生
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>
<script src="js/jquery.min.js?v=3.6.3"></script>
<script src="js/bootstrap.min.js?v=3.3.7"></script>
<!-- bootstrap-table 表格插件 -->
<script src="ajax/libs/bootstrap-table/bootstrap-table.min.js?v=1.18.3"></script>
<script src="ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=1.18.3"></script>
<script src="ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=1.18.3"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="ajax/libs/validate/jquery.validate.min.js?v=1.19.3"></script>
<script src="ajax/libs/validate/jquery.validate.extend.js?v=1.19.3"></script>
<script src="ajax/libs/validate/messages_zh.js?v=1.19.3"></script>
<!-- bootstrap-table 表格树插件 -->
<script src="ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js?v=1.18.3"></script>
<!-- 遮罩层 -->
<script src="ajax/libs/blockUI/jquery.blockUI.js?v=2.70.0"></script>
<script src="ajax/libs/iCheck/icheck.min.js?v=1.0.3"></script>
<script src="ajax/libs/layer/layer.min.js?v=3.7.0"></script>
<script src="ajax/libs/layui/layui.min.js?v=2.8.18"></script>
<script src="ruoyi/js/common.js?v=4.7.8"></script>
<script src="ruoyi/js/ry-ui.js?v=4.7.8"></script>
<script src="ajax/libs/jquery-layout/jquery.layout-latest.js?v=1.4.4"></script>
<script inline="javascript">
    $(function () {
        var options = {
            url: "stuList",//查询列表数据要访问的路径
            viewUrl: "mx/{id}",//调用$.operate.view时，会访问该路径
            createUrl: "addY",//调用$.operate.add()时，会访问该路径
            updateUrl: "editY/{id}",//调用$.operate.edit()时，会访问该路径
            columns: [
                {
                    field: 'xh',
                    title: '学号'
                },
                {
                    field: 'mz',
                    title: '名字'
                },
                {
                    field: 'tjsj',
                    title: '添加时间'
                },
                {
                    field: 'xgrq',
                    title: '修改日期'
                },
                {
                    title: '操作',
                    formatter: function (value, row, index) {
                        if (row.zxzt == 0) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                            return actions.join("");
                        } else if (row.zxzt == 1) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
                            return actions.join("");
                        }
                    }
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>
